const state = {
  userInfo: {
    name: 'zhangsan',
    age: 18
  }
}
const mutations = {
  changeUserInfo (state, obj) {
    state.userInfo.name = obj.name
    state.userInfo.age = obj.age
  }
}
const actions = {}
const getters = {
  uppcaseName (state) {
    return state.userInfo.name.toUpperCase()
  }
}

export default {
  // 开启命名空间
  namespaced: true,
  state,
  mutations,
  actions,
  getters
}
